import request from '@/utils/request'

export function getDepartments() {
  return request({
    url: '/company/department'
  })
}

/**
 *  获取员工的简单列表
 * **/
export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}

// 新增部门
export function addEmployee(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

// 修改部门
export function editEmployee(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}
// 删除部门
export function delEmployee(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}
